<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of listing_model
 * 
 * @author Joydeb Choudhury(mcajoydeb@gmail.com)
 */
class Admin_payment_gateway_model extends CI_Model {

    //put your code here
    function __construct() {
        parent::__construct();
        log_message('debug', 'Model Initialized');
    }

function get_payment_gateway() {

        $sql = "select * from paypal";
        $query = $this->db->query($sql);
        $result = $query->row();
        return $result;
    }
    
    
    function getPayments(){
    
    	$sql="select * from paypal_payment";
    	$query = $this->db->query($sql);
    	if ($query->result())
    		return $query->result();
    	else
    		return false;
    
    }
    
    function getPaymentsinfo($id){
    
    	$sql="select * from paypal_payment where id = $id";
    	$query = $this->db->query($sql);
    	if ($query->row())
    		return $query->row();
    	else
    		return false;
    
    }

}

?>
